Page({
  onLoad({ point, building }) {
    this.mosk(point, building)
  },
  //伪造选择房间
  mosk(point, building) {
    // 伪造房间号数据
    const size = Math.floor(Math.random() * 5) + 4
    const rooms = []

    // 随生生成若干个房间号
    for (let i = 0; i < size; i++) {
      // 随机楼层号
      const floor = Math.floor(Math.random() * 20) + 1
      // 随机房间号
      const No = Math.floor(Math.random() * 3) + 1
      // 组合楼层和房间号
      const room = `${floor}0${No}`
      if (rooms.includes(room)) continue
      rooms.push(room)
    }
    this.setData({
      point: point,
      building: building,
      rooms: rooms
    })
  }
})